﻿TreeGridLoaded ({ /* JSONP header, to be possible to load from xxx_Jsonp data source */ 
   "Cfg" : { "id": "Photoalbum", "MainCol": "A", "HideRootTree": "1", "NoTreeLines": "1", "Sorting": "0", 
      "NoScrollAfterExpand": "1", "SaveExpanded": "0", "NoFormatEscape": "1", 
      "ColMoving": "0", "Selecting": "0", "Deleting": "0", "Adding": "0", "Editing": "0", "Dragging": "0", "MaxHeight": "1", 
      "SortCols": "D,B", "ChildPartMin": "5", "ChildPartLength": "5"  
       }, 
   "Actions" : { "OnDragRow": "Scroll", "OnEnter": "if(Img) Img.oncontextmenu(); else { ExpandF OR CollapseF }", "OnSpace": "if(Img) Img.onclick(); else { ExpandF; First(Grid.FRow); }", "OnEsc": "if(Img) Img.onclick();", 
      "OnPageDown": "if(Img) Img.onmousewheel({wheelDelta:-120},1); else { PageDown; return 1; }", "OnPageUp": "if(Img) Img.onmousewheel({wheelDelta:120},1); else { PageUp; return 1; }", 
      "OnDown": "if(Img) Img.onmousewheel({wheelDelta:-120}); else { GoDown; return 1; }", "OnUp": "if(Img) Img.onmousewheel({wheelDelta:120}); else { GoUp; return 1; }", 
      "OnRight": "if(Img) Img.onmousewheel({wheelDelta:-120}); else { GoRight; return 1; }", "OnLeft": "if(Img) Img.onmousewheel({wheelDelta:120}); else { GoLeft; return 1; }", 
      "OnDel": "window.CollapseAll();", "OnF1": "Help();CancelEvent(event);"  
       }, 
   "Panel" : { "Visible": "0"   }, 
   "Cols" : [ 
      { "Name": "A", "Type": "Text", "Format": "|0|<B>|</B>", "RelWidth": "100"   }, 
      { "Name": "B", "Type": "Date", "Format": "ddd d. MMMM yyyy", "Width": "145"   }, 
      { "Name": "C", "Type": "Date", "Format": "ddd d. MMMM yyyy", "Width": "145"   }, 
      { "Name": "D", "Type": "Int", "Visible": "0", "CanHide": "0"   }  
   ], 
   "Def" : [ 
      { "Name": "R", "MaxHeight": "0", "Width": "800", "D": "2", "OnClick": "Focus,Expand OR Collapse", "FocusRow": "Border,Color", "FocusCell": "Color"   }, 
      { "Name": "Root", "Class": "RootNode", "AClass": "RootNodeText", "Height": "26", "OnClick": "1", "CanFocus": "0", "CanExpand": "0"   }, 
      { "Name": "Desc", "CanFocus": "0", "AType": "Html", "Spanned": "1", "ASpan": "3", "D": "0"   }, 
      { "Name": "Img", "CanFocus": "0", "AType": "List", "Spanned": "1", "ASpan": "3", "D": "1"   }  
   ], 
   "Header" : { "A": "Description and photos", "B": "Date from", "C": "Date to", "Class": "Header"   }, 
   "Solid" : [ 

      // Photo preview 
      { "id": "Preview", "Cells": "Preview", "PreviewType": "Html", "PreviewRelWidth": "1", "PreviewAlign": "Center", "Height": "200"   }, 

      // Toolbar with radios 
      { "Kind":"Toolbar", "id": "Menu", "Cells": "Sep1,Photo,Preview,Thumbnails,Sep2,Collapse,Help,Sep3", 

         "PhotoLabel": "<b>Photo:&nbsp;</b>", "PhotoType": "Radio", "PhotoEnum": "|dialog|new&nbsp;window", "PhotoCanEdit": "1", 
         "PhotoFormula": "Win", "PhotoOnChange": "Win = Value;", 

         "PreviewLabel": "<b>Preview:&nbsp;</b>", "PreviewType": "Radio", "PreviewEnum": "|none|small|medium|large", "PreviewCanEdit": "1", 
         "PreviewFormula": "Prev", "PreviewOnChange": "PreviewChange(Value)", "PreviewVisibleFormula": "Thumb!=4", "PreviewLabelVisibleFormula": "Thumb!=4", 

         "ThumbnailsLabel": "<b>Thumbnails:&nbsp;</b>", "ThumbnailsType": "Radio", "ThumbnailsEnum": "|small|magnified|large|preview", "ThumbnailsCanEdit": "1", 
         "ThumbnailsFormula": "Thumb-1", "ThumbnailsOnChange": "ThumbnailsChange(Value+1)", 

         "CollapseType": "Button", "CollapseButton": "Button", "CollapseOnClick": "CollapseAll", "CollapseButtonText": "Collapse all", 

         "HelpType": "Button", "HelpButton": "Button", "HelpOnClick": "Help();return true;", "HelpButtonText": "Help", 

         "Sep1Type": "Html", "Sep2Type": "Html", "Sep1RelWidth": "1", "Sep2RelWidth": "1", "Sep3Type": "Html", "Sep3Width": "15"  
          }, 

      // Two smaller ones 
      { "Kind":"Toolbar", "id": "Menu1", "Kind": "Toolbar1", "Mirror": "Menu", "Cells": "Photo,Preview", "Visible": "0", "CanHide": "0"   }, 
      { "Kind":"Toolbar", "id": "Menu2", "Kind": "Toolbar2", "Mirror": "Menu", "Cells": "Thumbnails,Sep2,Collapse,Help,Sep3", "Visible": "0", "CanHide": "0"   }, 

      // Four yet smaller ones 
      { "Kind":"Toolbar", "id": "Menu11", "Kind": "Toolbar12", "Mirror": "Menu", "Cells": "Photo", "Visible": "0", "CanHide": "0"   }, 
      { "Kind":"Toolbar", "id": "Menu12", "Kind": "Toolbar12", "Mirror": "Menu", "Cells": "Preview", "Visible": "0", "CanHide": "0"   }, 
      { "Kind":"Toolbar", "id": "Menu21", "Kind": "Toolbar21", "Mirror": "Menu", "Cells": "Thumbnails", "Visible": "0", "CanHide": "0"   }, 
      { "Kind":"Toolbar", "id": "Menu22", "Kind": "Toolbar22", "Mirror": "Menu", "Cells": "Sep3,Collapse,Help", "Visible": "0", "CanHide": "0", "Sep3Width": "8"   }  

   ], 

   // Splits the toolbar for smaller displays 
   "Media" : [ 
      { "MinWidth": "511", "MaxWidth": "1000", 
         "Rows" : [ 
            { "id": "Menu", "Visible": "0", "CanHide": "0"   }, 
            { "id": "Menu1", "Visible": "1", "CanHide": "1"   }, 
            { "id": "Menu2", "Visible": "1", "CanHide": "1"   }  
         ], 
      }, 
      { "MaxWidth": "510", 
         "Rows" : [ 
            { "id": "Menu", "Visible": "0", "CanHide": "0"   }, 
            { "id": "Menu11", "Visible": "1", "CanHide": "1"   }, 
            { "id": "Menu12", "Visible": "1", "CanHide": "1"   }, 
            { "id": "Menu21", "Visible": "1", "CanHide": "1"   }, 
            { "id": "Menu22", "Visible": "1", "CanHide": "1"   }  
         ], 
      }, 
   ], 
   "Toolbar" : { "Visible": "0"   }, 

   // Custom attributes, informational texts 
   "Cfg_2" : { "Help": "Left click returns to the list<br>Mouse wheel goes to next or previous image<br>Right click zooms image<br>Zoomed image can be scrolled by mouse wheel<br>If browser stops loading photos, press F5"   }, 
   "Cfg_3" : { "HelpGrid": "<b>Photo list</b><br>Click to the gray row expands or collapses it<br>Click to photo thubnail shows it in dialog, window or preview (according to the settings).<br>Mouse wheel scrolls the list up or down.<br><br>White cursor can be moved by arrow keys, PGUp, PgDn, Home, End. <br>Enter on row with cursor expands or collapses it.<br>Space on row with cursor shows the first photo in dialog, window or preview (according to the settings).<br>Del collapses all rows.<br><br><b>Photo in dialog</b><br>"   }, 
}) /* End of JSONP header */ 